package com.mdtx.database;

import java.util.Properties;

/**
 * 数据库信息类
 *
 * @author 猫啊
 * @create 2018-06-12 17:47
 **/
public class DataBaseDriver {

    /**
     * 驱动
     */
    private String driver;
    /**
     *地址
     */
    private String url;
    /**
     *用户
     */
    private String user;
    /**
     *密码
     */
    private String password;

    /**
     * 其他属性
     */
    private Properties dbInfo =  new Properties();

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Properties getDbInfo() {
        dbInfo.setProperty("user", this.user);
        dbInfo.setProperty("password", this.password);
        return dbInfo;
    }

    public void setDbInfo(String key,String value) {
        this.dbInfo.setProperty(key,value);
    }
}
